<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- CSS -->
    <link rel="stylesheet" type="text/css"
        href="https://cdn.jsdelivr.net/npm/diff2html/bundles/css/diff2html.min.css" />

    <!-- Javascripts -->
    <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/diff2html/bundles/js/diff2html.min.js"></script>
</head>

<body>
    <h1>diff2html</h1>
    <div id="destination-elem-id"></div>

    <script>
        document.addEventListener('DOMContentLoaded', () => {
            var diffHtml = Diff2Html.html('<Unified Diff String>', {
                drawFileList: true,
                matching: 'lines',
                outputFormat: 'side-by-side',
            });
            document.getElementById('destination-elem-id').innerHTML = diffHtml;
        });
    </script>
</body>

</html>